#pragma once

#include "includeBase.h"
#include "../common/BasePclModel.h"

class VoxelGridModel : public BasePclModel
{
public:
    VoxelGridModel();

public:
    static VoxelGridModel& get();

public: // IJsonSerializable
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    QJsonObject toJson() const override;

public: // Property
    QString pcdFile() const { return pcdFile_; }
    void setPcdFile(const QString& pcdFile) { pcdFile_ = pcdFile; }

    double leafSizeForX() const { return leafSizeForX_; }
    void setLeafSizeForX(double leafSizeForX) { leafSizeForX_ = leafSizeForX; }

    double leafSizeForY() const { return leafSizeForY_; }
    void setLeafSizeForY(double leafSizeForY) { leafSizeForY_ = leafSizeForY; }

    double leafSizeForZ() const { return leafSizeForZ_; }
    void setLeafSizeForZ(double leafSizeForZ) { leafSizeForZ_ = leafSizeForZ; }

private:
    QString pcdFile_ = "<pcl-data>/tutorials/table_scene_lms400.pcd";

    double leafSizeForX_ = 0.1;
    double leafSizeForY_ = 0.1;
    double leafSizeForZ_ = 0.1;
};
